import request from '@/utils/request'

// 获取客户列表
export function getCustomer(data) {
  return request({
    url: 'crm/invoice/getCustomer',
    method: 'post',
    data: data
  })
}

// 获取开票金额
export function getInvoiceMoney(data) {
  return request({
    url: 'crm/invoice/getInvoiceMoney',
    method: 'post',
    data: data
  })
}

// 保存开票
export function saveInvoice(data) {
  return request({
    url: 'crm/invoice/add',
    method: 'post',
    data: data
  })
}

// 修改开票
export function updateInvoice(data) {
  return request({
    url: 'crm/invoice/update',
    method: 'post',
    data: data
  })
}
// 开票详情
export function detailInvoice(data) {
  return request({
    url: 'crm/invoice/detail',
    method: 'post',
    data: data
  })
}
//批量开票列表导出数据
export function crmInvoiceExport(data) {
  return request({
    url: 'crm/invoice/export',
    method: 'post',
    data: data,
    responseType: 'blob',
    timeout: 600000
  })
}